package com.marquis.cloud;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

import java.util.Scanner;

@SpringBootApplication
@EnableEurekaClient //声明为Eureka客户端
@EnableFeignClients//打开Feign
@EnableCircuitBreaker//打开Hystrix断路器
//@ServletComponentScan//扫描缓存
public class CallerRun {

    public static void main(String[] args) {
        System.out.println("请输入profiles:");
        Scanner scanner = new Scanner(System.in);
        String profiles = scanner.nextLine();
        new SpringApplicationBuilder(CallerRun.class).profiles(profiles).run(args);
    }
}
